package Cn.Sarkar.IMS.Entities

import Cn.Sarkar.Entities.Common.Additional.IDescription
import Cn.Sarkar.Entities.Common.Additional.IName
import Cn.Sarkar.Entities.Common.BaseEntity
import Cn.Sarkar.Entities.IMS.IIMSApplicationDomain
import Cn.Sarkar.Entities.IMS.IType
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.hasOne
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.IDataContext
import Cn.Sarkar.IMS.DataBaseDefinations.Types

class Type(DataContext: IDataContext) : BaseEntity(DataContext, Types), IType {
    var applicationDomainID by Types.IMSApplicationDomainID
    override var imsApplicationDomain: IIMSApplicationDomain by hasOne(Types.IMSApplicationDomainID) { IMSApplicationDomain(it) }
    var NameID by Types.NameID
    override var name: IName by hasOne(Types.NameID) { Name(it) }
    var DescriptionID by Types.DescriptionID
    override var description: IDescription by hasOne(Types.DescriptionID) { Description(it) }
}